import request from "@/utils/request";

export const getCategoriesShopList = (params) => {
  return request({
    method: "GET",
    url: "/private/v1/categories",
    params,
  });
};
export const getParentCateList = (params) => {
  return request({
    method: "GET",
    url: "/private/v1/categories",
    params,
  });
};

export const addCategoriesInfoApi = (data) => {
  return request({
    method: "POST",
    url: "/private/v1/categories",
    data,
  });
};

export const editCategoriesApi = (id, data) => {
  return request({
    method: "PUT",
    url: "/private/v1/categories/" + id,
    data,
  });
};

export const getCategoriesInfoApi = (id) => {
  return request({
    method: "GET",
    url: "/private/v1/categories/" + id,
  });
};

export const delCategoriesInfoApi = (id) => {
  return request({
    method: "DELETE",
    url: "/private/v1/categories/" + id,
  });
};
